package edu.spex.yjl.week08.home.unit4.topic_one;

public class Cylinder extends Circle {
    private double hight;
    public Cylinder(double r,double h){
        super(r);
        this.hight=h;
    }
    public double getVolume(){
        double volume =getArea()*hight;
        return volume;
    }
    public void showVolume(){
        System.out.println(getVolume());
    }
    public static  void main(String[] args){
        Circle c=new Circle(2.3);
        c.show();
        Cylinder cy=new Cylinder(2.3,1.5);
        cy.showVolume();
    }

}
